package com.jhte.scheduleJob.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.nio.charset.Charset;
import java.util.Date;
import java.util.Map;

@Component
public class TaskTest {
    public final Logger logger = LoggerFactory.getLogger(this.getClass());

    public void run() {
        logger.info("-------------run start---------------" + (new Date()));
        try {
            Thread.sleep(6000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        logger.info("-------------run end---------------" + (new Date()));
    }

    public void run1() {
        logger.info("-------------run1 start---------------" + (new Date()));
        try {
            Thread.sleep(6000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        logger.info("-------------run1 end---------------" + (new Date()));
    }

    public static void main(String[] args) {
        String c = null;
        Map<String, Charset> charsets = Charset.availableCharsets();
        for (Map.Entry<String, Charset> entry : charsets.entrySet()) {
            System.out.println(entry.getKey());
        }

    }
}
